{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Populating the interactive namespace from numpy and matplotlib\n"
     ]
    }
   ],
   "source": [
    "%pylab inline\n",
    "import matplotlib.pyplot as plt\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import numpy.random as rng\n",
    "import pandas.io.data as web\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# we modify this data organizing slightly to get two symbols\n",
    "def get_prices(symbol):\n",
    "    start, end = '2007-05-02', '2016-04-11'\n",
    "    data = web.DataReader(symbol, 'yahoo', start, end)\n",
    "    data=pd.DataFrame(data)\n",
    "    prices=data['Adj Close']\n",
    "    prices=prices.astype(float)\n",
    "    return prices\n",
    "\n",
    "def get_returns(prices):\n",
    "        return ((prices-prices.shift(-1))/prices)[:-1]\n",
    "    \n",
    "def get_data(list):\n",
    "    l = []\n",
    "    for symbol in list:\n",
    "        rets = get_returns(get_prices(symbol))\n",
    "        l.append(rets)\n",
    "    return np.array(l).T\n",
    "\n",
    "def sort_data(rets):\n",
    "    ins = []\n",
    "    outs = []\n",
    "    for i in range(len(rets)-100):\n",
    "        ins.append(rets[i:i+100].tolist())\n",
    "        outs.append(rets[i+100])\n",
    "    return np.array(ins), np.array(outs)\n",
    "        \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "symbol_list = ['C', 'GS']\n",
    "rets = get_data(symbol_list)\n",
    "ins, outs = sort_data(rets)\n",
    "ins = ins.transpose([0,2,1]).reshape([-1, len(symbol_list) * 100])\n",
    "div = int(.8 * ins.shape[0])\n",
    "train_ins, train_outs = ins[:div], outs[:div]\n",
    "test_ins, test_outs = ins[div:], outs[div:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "sess = tf.InteractiveSession()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# once again I only make slight modifications\n",
    "\n",
    "# define placeholders \n",
    "x = tf.placeholder(tf.float32, [None, len(symbol_list) * 100])\n",
    "y_ = tf.placeholder(tf.float32, [None, len(symbol_list)])\n",
    "\n",
    "# define trainable variables\n",
    "W = tf.Variable(tf.random_normal([len(symbol_list) * 100, len(symbol_list)]))\n",
    "b = tf.Variable(tf.random_normal([len(symbol_list)]))\n",
    "\n",
    "# we define our model: y = W*x + b\n",
    "y = tf.matmul(x, W) + b\n",
    "\n",
    "#MSE:\n",
    "cost = tf.reduce_sum(tf.pow(y-y_, 2))/(2*1000)\n",
    "optimizer = tf.train.GradientDescentOptimizer(0.5).minimize(cost)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 1000 cost= 0.040910859\n",
      "Epoch: 2000 cost= 0.020840863\n",
      "Epoch: 3000 cost= 0.013389181\n",
      "Epoch: 4000 cost= 0.009200850\n",
      "Epoch: 5000 cost= 0.006651346\n",
      "Epoch: 6000 cost= 0.005042211\n",
      "Epoch: 7000 cost= 0.003999272\n",
      "Epoch: 8000 cost= 0.003308342\n",
      "Epoch: 9000 cost= 0.002842027\n",
      "Epoch: 10000 cost= 0.002522263\n",
      "Epoch: 11000 cost= 0.002299956\n",
      "Epoch: 12000 cost= 0.002143553\n",
      "Epoch: 13000 cost= 0.002032371\n",
      "Epoch: 14000 cost= 0.001952614\n",
      "Epoch: 15000 cost= 0.001894943\n",
      "Epoch: 16000 cost= 0.001852949\n",
      "Epoch: 17000 cost= 0.001822181\n",
      "Epoch: 18000 cost= 0.001799512\n",
      "Epoch: 19000 cost= 0.001782728\n",
      "Epoch: 20000 cost= 0.001770250\n"
     ]
    }
   ],
   "source": [
    "# initialize variables to random values\n",
    "init = tf.initialize_all_variables()\n",
    "sess.run(init)\n",
    "# run optimizer on entire training data set many times\n",
    "for epoch in range(20000):\n",
    "    sess.run(optimizer, feed_dict={x: train_ins, y_: train_outs})#.reshape(1,-1).T})\n",
    "    # every 1000 iterations record progress\n",
    "    if (epoch+1)%1000== 0:\n",
    "        c = sess.run(cost, feed_dict={x: train_ins, y_: train_outs})#.reshape(1,-1).T})\n",
    "        print(\"Epoch:\", '%04d' % (epoch+1), \"cost=\", \"{:.9f}\".format(c))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1109e8860>]"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEGCAYAAACEgjUUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm81VW9//HXh+GADIKkIZOiiabeTBxwSOVoYWKlZWYO\nqWmlWWYOOda9Yr9bNph6MzXtqpkN5hQ5cDUcDloqYsyCIoKKqCgyiBzgHGD9/lh7+f3uffY8nL33\n2e/n43Ee3/Hs/TmHw+e79vp+vmuZcw4REenaulU7ABERqTwlexGRBqBkLyLSAJTsRUQagJK9iEgD\nULIXEWkAnZbszexWM1tmZnPyOPcQM5tuZu1m9uWUY6ea2YLE1ymVi1hEpOvozJb9bcAReZ77GnAq\n8Of4TjMbBPwXMCbxdbmZDSxnkCIiXVGnJXvn3FPAyvg+M/uYmf2fmT1vZk+a2S6Jc19zzs0BNqe8\nzGeBfzjnVjnnVgGTyf8CIiLSsHpU+f1vBs50zi00s/2AG4BPZzl/KPBGbPsNYFgF4xMR6RKqluzN\nrB9wAHC3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rqkmrGZWYfA87Ff3QdCvQzs69VM6a0b5A7hk5lZj8E2pxzf66BWPoA\nlwGXx3dXKZy4HsBWzrn98Q2vu6ocD8AtwDnOue2A84Bby/0GnZHsl+L77IIRJF+RKsbMeuIT/R3O\nuYmJ3cvMbNvE8SHAOxniHE70UapcDgSOMrPFwF+Aw8zsjirHBP7f4w3n3LTE9j345P92FePaB3ja\nOfeec24jcB9wQJVjCgr593ojsX94yv6yx2ZmX8d3EZ4U213NmD6Gv1jPSvzNDwf+bX7srGrG9Qb+\n74nE3/xmM9u6yjGNcc79LbF+D1EXZPliKvYmQwE3I3oAr+D/0ZvovBu0hu/HuiZl/y+AixPrl9Dx\nRlYTvlvjFRI3QioU31jggVqJCXgS2DmxPiERU9XiAj4JzAW2SPxb3g58txoxJf52U2/QFhQDvgtx\nv8TPUo6boakxHQG8AGydcl6nxZQurpRj6W7QVuN3dSZwRWJ9Z+D1GohpOn7kAYBPA9PKHVPZk0aG\nH2w8vhpmIXBpJ73nQfh+8ZnAjMTXEcAg4FFgAfAPYGDsey5LxPgiiTvjFYxvLFE1TtVjwifXacAs\nfKtnQLXjwt/UewGYg0/2PTs7JvwnsDeBNvy9p9OKiQHYO/FzLAR+XeaYTgdeBl6L/a3f0JkxpcS1\nIfyuUo4vIpHsq/C7+jCmxN/RHYn3+DfQXOV/v9Pwn2Sn4vPVM8Docsekh6pERBpApzxUJSIi1aVk\nLyLSAJTsRUQagJK9iEgDULIXEWkASvYiIg1AyV5EpAEo2YuINID/D2Zw8fqiuiEYAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x110876eb8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#train results\n",
    "predict = y\n",
    "p = sess.run(predict, feed_dict={x: train_ins})\n",
    "position = 2*((p>0)-.5)\n",
    "returns= position * train_outs\n",
    "daily_returns = sum(returns,1)\n",
    "plot(np.cumprod(daily_returns+1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x110b10e10>]"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEACAYAAAC57G0KAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXecXHXV/98nZZNN2RQ2ZUkPCSlACD0CwlKEUAIIKgIS\nla6AleqjJlGfRx8ffj7ygGBEQBAMiAiCIBCQVaQmQEgPSUhPdlM22ZKEkE2+vz/OXOfu7PS908/7\n9drXzNy5c+/Zu7OfOXO+p4hzDsMwDKP46JBrAwzDMIzMYAJvGIZRpJjAG4ZhFCkm8IZhGEWKCbxh\nGEaRYgJvGIZRpCQUeBF5QETqRGRBgv2OEZEWEbkwOPMMwzCMdEnGg38QmBxvBxHpCPw38AIgAdhl\nGIZhtJOEAu+cew3YnmC3G4E/AVuCMMowDMNoP+2OwYvIIOB84N7QJiuNNQzDyAOCWGT9JXCb054H\ngoVoDMMw8oJOARzjKOAxEQGoBM4Skb3OuWf8O4mIefaGYRhp4JxLy3FutwfvnBvpnBvhnBuBxuG/\nFinuvn3z6mfatGk5t6EQbMpXu8wms6kU7GoPCT14EZkFnAxUisg6YBrQOSTYM9t1dsMwDCNjJBR4\n59wlyR7MOffV9pljGIZhBEVJV7JWV1fn2oQ25KNNkJ92mU3JkQ82Pf88tLSEH+eDTdHIV7vSRdob\n40n6RCIuW+cyDCN/2L8fevaEuXNh3LhcW1N4iAguV4ushmEY8Vi1CnbtgoaGXFtSegSRJmkYhhGV\nZcvgxz/W+ybw2cc8eMMwMsYf/wiPPqr3TeCzjwm8YRgZo3t3vZ0wwQQ+F1iIxjCMjNHYCD/8Iezc\nCTt25Nqa0sM8eMMwMkZTE1RUQK9e5sHnAhN4wygi9u+H557LtRVhGhs1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7rfDCxBazBydq3i2AS5vVa7QnfLUKdqOzl+T8WxC3J4rURkMHA28FufHTm9VjFsEgK4TpkW+GQK\npbKJA14WLci6OrRtgHOuLnS/DhiQA7ti2XAges08sn39bhSRD0Tkft/X1qzbJJrFdQTwNnlyrXw2\nvRXalLNrJSIdRGQeej1edc4tIg+uUwy7ILfvq/8FbkYTQjxyfa2i2eQI4DplWuDzbQX3BOfcEcBZ\nwPUi8mn/k06/A+XU5iRsyJZ99wIjgInAJuD/xdk3YzaJSA/gSeCbzrmmVifN0bUK2fSnkE3N5Pha\nOef2O+cmAoOBk0TklIjnc3KdothVTQ6vlYicC2x2zr1PdO8469cqjk2BXKdMC/wGYIjv8RBaf/pk\nFefcptDtFuAp9KtNnYgMBBCRKmBzDkyLZUPk9Rsc2pZxnHObXQj0q6P3NTBrNolIZ1Tcf++cezq0\nOafXymfTI55N+XCtQnY0AM8BR5FH7ymfXUfn+FodD5wnIquAWcCpIvJ7cnutotn0cGDXKRMLBr4F\ngU7ASnQxoIwcLrKibRR6hu53B14HzkAXWG4Nbb+NDC+yhs4znLaLrG1sILygUoZ+mq8klNqaBZuq\nfPe/Dfwhmzah3szDwP9GbM/ZtYpjU86uFVAJ9A7dLwf+ibYNyel7Ko5dA3P5vvKd+2Tg2Vy/p+LY\nFMh7KiOGRhh9FpptsAK4PdPni2PHiNCFmQcs9GwB+gIvAx8CL3lvygzaMQutCv4EXZ/4ajwbgO+F\nrt1S4Mws2XRFSMjmAx8AT6NxymzadCIak5wHvB/6mZzLaxXDprNyea2Aw4D3QjbNB25O9L7O0t8v\nll05fV/5znUy4YyVnF4r37mqfTb9PojrZIVOhmEYRYqN7DMMwyhSTOANwzCKFBN4wzCMIsUE3jAM\no0gxgTcMwyhSTOANwzCKFBN4wzCMIsUE3jAMo0j5/+qKBIrAcs+rAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1108f6a58>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#test results\n",
    "predict = y\n",
    "p = sess.run(predict, feed_dict={x: test_ins})\n",
    "position = 2*((p>0)-.5)\n",
    "returns= position * test_outs\n",
    "daily_returns = sum(returns,1)\n",
    "plot(np.cumprod(daily_returns+1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
